package tasks;


import java.util.Scanner;

/**
 * https://wiki.amoscloud.com/zh/ProgramingPractice/NowCoder/Adecco/Topic0007
 */
public class Task007 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] strArray = scanner.nextLine().split("\\s+");
        String[] inputArray = scanner.nextLine().split("\\s+");
        if (strArray == null || inputArray == null || inputArray.length != 2) {
            return;
        }
        int start = Integer.parseInt(inputArray[0]);
        int end = Integer.parseInt(inputArray[1]);

        int length = strArray.length;
        if (length < end) {
            end = length;
        }
        int normalEnd = end;
        String[] array = new String[length];
        for (int i = 0; i < length; i++) {
            if (i < start || i > end) {
                array[i] = strArray[i];
            }else {
                array[i] = strArray[normalEnd--];
            }
        }
        for (String s : array) {
            System.out.print(s + " ");
        }
    }
}
